package com.hk.demo01;

import com.hk.bean.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author yellow Docter
 * @date 2023 -10-10
 * @desc
 *  xml的依赖注入 引用类型
 */
public class Demo04 {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application.xml");

        Person p1 = applicationContext.getBean("p1", Person.class);
        System.out.println("p1 = " + p1);

    }

}
